<template>
  <div id="app">
    <div class="test">{{text}}</div>
    <br />
    <button @click="reverseStr">点击反转</button>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      text: "HELLO WORLD"
    };
  },
  methods: {
    reverseStr() {
      this.text = this.text
        .split("")
        .reverse()
        .join("");
    }
  }
};
</script>

<style>
.test {
  width: 300px;
  height: 100px;
  text-align: center;
  color: aqua;
}
</style>
